#!/usr/bin/env bash
#
# platform
#
DIR="$(cd "$(dirname "$0")" && pwd)"
APP_FILE="${DIR}/platform-boot-1.0.0-exec.jar"

main() {
  PID=$(pgrep -fn "${APP_FILE}")
  if [ -z "${PID}" ]; then
    echo "platform is not running"
  else
    echo "Stopping platform... pid: ${PID}"
    kill -15 "${PID}"
    echo ".................... [OK]"
  fi
  return 0
}

main "$@"
exit $?
